fix(ci): don't fail scoped test selection when zero test files match#8167
Merged
Conversation
A PR whose scoped-selection paths (backend/miner/mcp/discoveryIndex) only
touch files no test imports -- e.g. a pure docs-only change under
packages/loopover-miner/docs/** -- correctly triggers scoped test selection
(vitest --changed=origin/main), which then correctly finds nothing to run
("No test files found, exiting with code 0"). That legitimate outcome wrote
no coverage/lcov.info, which "Verify coverage report exists" treated as a
hard failure regardless of cause.
Confirmed live: PR #8165 (packages/loopover-miner/docs + apps/loopover-ui/
content/docs mdx only) failed all 3 validate-tests shards this way despite
nothing being broken.
Captures vitest's own "No test files found" stdout in the scoped branch and
skips the coverage-existence check specifically for that case, while a real
failure (tests ran and failed, or the step crashed before producing output)
still fails the job exactly as before.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jul 23, 2026
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This was referenced Jul 23, 2026
Merged
JSONbored
added a commit
that referenced
this pull request
Jul 23, 2026
…ults upload step (#8173) #8167 taught the verify step that a scoped selection matching zero test files writes no report and is not a failure -- but left every upload step below it unguarded, so the trusted/fork coverage uploads (fail_ci_if_error: true) would still turn that non-event red on the missing lcov, and the junit uploads would noisily fail on a missing xml. It also left codecov-policy.test.ts pinning the old verify condition, which broke that suite on main for every branch. Adds the same steps.coverage.outputs.no_tests_matched guard to all five upload steps and re-pins the policy test to the completed invariant: the escape hatch exists exactly once, and every upload below the verify step carries it.
JSONbored
added a commit
that referenced
this pull request
Jul 23, 2026
…8174) #8167 fixed the per-shard --changed case (exits 0 with "No test files found"), but --mergeReports exits 1 for the same condition -- a different code path, not covered by that fix. Confirmed live: PR #8168 (the same docs-only PR #8167 was meant to unblock) passed all 3 validate-tests shards but still failed validate-tests-merge with "No test files found, exiting with code 1", even with COVERAGE_NO_THRESHOLDS already disabling the threshold check. Only treats that exact case as success, and only when COVERAGE_NO_THRESHOLDS is set (i.e. this run is the scoped case to begin with) -- in the unscoped full-suite case, "no test files found" while merging is still a real failure worth surfacing loudly.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/loopover-miner/docs/**-- correctly triggers scoped test selection (vitest --changed=origin/main), which then correctly finds nothing to run ("No test files found, exiting with code 0"). That legitimate outcome writes nocoverage/lcov.info, which "Verify coverage report exists" treated as a hard failure regardless of cause.packages/loopover-miner/docs+apps/loopover-ui/content/docsmdx only) failed all 3validate-testsshards this way despite nothing being broken.Test plan
.github/workflows/ci.yml; nosrc/**changes, so no Codecov impact.actionlint .github/workflows/ci.ymlpasses..github/workflows/**, which isn't a scoped-selection path, so it runs the full suite as normal) -- the real verification is docs(discovery-plane): finalize operator guide now that the plane is shipped and live #8165 going green once this merges and re-triggers it.